<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
	
	<xsl:param name="eaditor-url">http://localhost:8080/orbeon/ead/c/</xsl:param>

	<xsl:template match="/">
		<ul>
			<xsl:apply-templates select="descendant::dsc/c"/>
		</ul>
	</xsl:template>

	<xsl:template match="c">
		<li>
			<a href="{$eaditor-url}?guide={ancestor::ead/@id}&amp;component={@id}" target="_blank"><xsl:value-of select="did/unittitle"/></a>
			<xsl:if test="c">
				<ul>
					<xsl:apply-templates select="c"/>
				</ul>
			</xsl:if>
		</li>
	</xsl:template>

</xsl:stylesheet>
